$(document).ready(function(){
	$(".moveDiv").css("position","absolute");
	$(".moveDiv").mousedown(function(event){
		var offset=$(this).offset();
		x1=event.clientX-offset.left;
		y1=event.clientY-offset.top;
		$(this).mousemove(function(event){
		   $(this).css("left",(event.clientX-x1)+"px");
			$(this).css("top",(event.clientY-y1)+"px");
		});
		$(this).mouseup(function(event){
			$(this).unbind("mousemove");
		});
	});
});